//
//  appmenu4jni.h
//  appmenu4jni
//
//  Created by Wang Zhi on 15/6/7.
//  Copyright (c) 2015年 Wang Zhi. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <JavaVM/jni.h>

@interface AppMenuAction : NSObject {
    jobject _handler;
}

/* Initialize the action with handler.
 */
-(instancetype) initWithHandler: (jobject)handler;

/* Handle the action.
 */
-(void) handleAction:(id)sender;

@end


#ifdef __cplusplus
extern "C" {
#endif
    
    /*
     * Class:     playfx_jni_NSAppMenu
     * Method:    insertMenuItem
     * Signature: (ILjava/lang/String;Lplayfx/NSAppMenu/ActionHandler;Ljava/lang/String;)V
     */
    JNIEXPORT void JNICALL Java_playfx_jni_NSAppMenu_insertMenuItem
    (JNIEnv *, jobject, jint, jstring, jobject, jstring);
    
    /*
     * Class:     playfx_jni_NSAppMenu
     * Method:    insertSeparator
     * Signature: (I)V
     */
    JNIEXPORT void JNICALL Java_playfx_jni_NSAppMenu_insertSeparator
    (JNIEnv *, jobject, jint);
    
    /*
     * Class:     playfx_jni_NSAppMenu
     * Method:    removeMenuItem
     * Signature: (I)V
     */
    JNIEXPORT void JNICALL Java_playfx_jni_NSAppMenu_removeMenuItem
    (JNIEnv *, jobject, jint);
    
#ifdef __cplusplus
}
#endif